#ifndef __LISP_H__
#define __LISP_H__
#include<string>
#include "lispcore.hpp"


namespace lisp
{
using var = core::var;
using core::nil;
std::string repr(const core::pointer&);
std::string repr(const core::cons&);
std::string repr(const var&);


//template<typename T1, typename T2> core::cons cons(T1 , T2 );


var car(const core::cons&);
var car(const var&);
var cdr(const core::cons& );
var cdr(const var& );


template<typename TOS, typename T> TOS& operator<<(TOS& os, const T& obj)
{
    using std::operator<<;
    return os << repr(obj);
}


template<typename T1, typename T2>
core::cons cons(T1 first, T2 second);


template<typename T1, typename T2>
int ffff(T1,T2);


 int g(int,int);
 int f(int ,int );
}//lisp::

template<typename T1, typename T2>
lisp::core::cons lisp::cons(T1 first, T2 second)
{
    return lisp::core::cons(std::make_shared<var>(first), std::make_shared<var>(second));
}



#endif // __LISP_H__
